<?php
include "../class/cart.class.php";
include "../class/goods.class.php";

session_start();
$cart = $_SESSION['cart'];
$goodsName = $_GET['name'];

if ($cart->add(array('id'=>$goodsName, 'num'=>1))) {
    #echo 'join ok!';
} else {
    #echo 'join failed!';
}

header("location: ../index.php");